/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package raccoon.suvisa.datos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Laura
 */
@Entity
@Table(name = "TRANSACCIONXCUENTA", catalog = "", schema = "IS963601")
@NamedQueries({@NamedQuery(name = "Transaccionxcuenta.findAll", query = "SELECT t FROM Transaccionxcuenta t"), @NamedQuery(name = "Transaccionxcuenta.findByIdTransaccion", query = "SELECT t FROM Transaccionxcuenta t WHERE t.idTransaccion = :idTransaccion"), @NamedQuery(name = "Transaccionxcuenta.findByIdCuenta", query = "SELECT t FROM Transaccionxcuenta t WHERE t.idCuenta = :idCuenta")})
public class Transaccionxcuenta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_TRANSACCION", nullable = false, precision = 22)
    private BigDecimal idTransaccion;
    @Basic(optional = false)
    @Column(name = "ID_CUENTA", nullable = false)
    private BigInteger idCuenta;

    public Transaccionxcuenta() {
    }

    public Transaccionxcuenta(BigDecimal idTransaccion) {
        this.idTransaccion = idTransaccion;
    }

    public Transaccionxcuenta(BigDecimal idTransaccion, BigInteger idCuenta) {
        this.idTransaccion = idTransaccion;
        this.idCuenta = idCuenta;
    }

    public BigDecimal getIdTransaccion() {
        return idTransaccion;
    }

    public void setIdTransaccion(BigDecimal idTransaccion) {
        this.idTransaccion = idTransaccion;
    }

    public BigInteger getIdCuenta() {
        return idCuenta;
    }

    public void setIdCuenta(BigInteger idCuenta) {
        this.idCuenta = idCuenta;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTransaccion != null ? idTransaccion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Transaccionxcuenta)) {
            return false;
        }
        Transaccionxcuenta other = (Transaccionxcuenta) object;
        if ((this.idTransaccion == null && other.idTransaccion != null) || (this.idTransaccion != null && !this.idTransaccion.equals(other.idTransaccion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "raccoon.suvisa.datos.entities.Transaccionxcuenta[idTransaccion=" + idTransaccion + "]";
    }

}
